﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IP2Client
{
    [Serializable]
    public class Measurement
    {
        public DateTime MeasurementTime { get; set; }

        public double Speed { get; set; }
        public double Distance { get; set; }

        public int HeartBeats { get; set; }
        public int Rpm { get; set; }
        public int Power { get; set; }
        public int Energy { get; set; }
        public int CurrentPower { get; set; }
        public string Time { get; set; }

        /// <summary>
        /// Constructor voor instantie's van de Meting klasse
        /// </summary>
        /// <param name="currentTime">Tijd van meting</param>
        /// <param name="heartBeats">Hartslagen per minuut</param>
        /// <param name="rpm">Rotatie's per minuut</param>
        /// <param name="speed">Snelheid</param>
        /// <param name="distance">Afstand</param>
        /// <param name="power">Ingestelde kracht</param>
        /// <param name="energy">Verbrande energie</param>
        /// <param name="time">Tijd van trainingssessie</param>
        /// <param name="currentPower">Huidige power</param>
        public Measurement(DateTime currentTime, int heartBeats, int rpm, double speed, double distance, int power, int energy, String time, int currentPower)
        {
            this.MeasurementTime = currentTime;
            this.HeartBeats = heartBeats;
            this.Rpm = rpm;
            this.Speed = speed;
            this.Distance = distance;
            this.Power = power;
            this.Energy = energy;
            this.Time = time;
            this.CurrentPower = currentPower;
        }

        /// <summary>
        /// ToString methode voor elke meting
        /// </summary>
        /// <returns>String met daarin de waarden van de meting</returns>
        public override string ToString()
        {
            return MeasurementTime + ": \t" + HeartBeats + " " + Rpm + " " + Speed + " " + Distance + " " + Power + " " + Energy + " " + Time + " " + CurrentPower + "\n";
        }

    }
}
